package com.bridgeintelligent.tag.engine.api.rsp;

import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Map;


@Data
@Accessors(chain=true)
@RequiredArgsConstructor(staticName = "of")
public class MultiAnalysisAggregationResult {

    private String xDimId;
    private String xDimName;
    private String xClassify;
    private String yDimId;
    private String yDimName;
    private String yClassify;
    private long totalCount;
    private long existCount;
    private List<X> data;
    private List<String> fields;
    private Map<String,String> fieldsMap;

    @Data
    @Accessors(chain=true)
    @RequiredArgsConstructor(staticName = "of")
    public static class X{
        private String title;
        private long count;
        private String percent;
        private List<Y> ys;

    }

    @Data
    @Accessors(chain=true)
    @RequiredArgsConstructor(staticName = "of")
    public static class Y{
        private String title;
        private long count;
        private String percent;
        private List<Info> info;

    }
    @Data
    @Accessors(chain=true)
    @RequiredArgsConstructor(staticName = "of")
    public static class Info{
        private String field;
        private String maxValue;
        private String minValue;
        private String avgValue;
        private String sumValue;
    }
}
